//
//  JMMineHeaderV.m
//  NewiOSProject
//
//  Created by JMMac on 13.1.24.
//  Copyright © 2024 范智渊. All rights reserved.
//

#import "JMMineHeaderV.h"
@interface JMMineHeaderV ()

@property (nonatomic, strong)UIImageView *bgView;
@property (nonatomic, strong)UIImageView *icoonImgV;
@property (nonatomic, strong)UILabel *nameLab;
@property (nonatomic, strong)UILabel *phoneLab;
@property (nonatomic, strong)UIImageView *leftContV;
@property (nonatomic, strong)UILabel *usedLab;
@property (nonatomic, strong)UILabel *usedTitleLab;
@property (nonatomic, strong)UIImageView *rightContV;
@property (nonatomic, strong)UILabel *totalLab;
@property (nonatomic, strong)UILabel *totalTitleLab;
@end
@implementation JMMineHeaderV

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        _bgView = [[UIImageView alloc]initWithFrame:(CGRectMake(0, 0, kAppW(), ScaleW(324)))];
        [self addSubview:_bgView];
        
        _icoonImgV = [[UIImageView alloc]initWithFrame:(CGRectMake(24, 80, 72, 72))];
        [self addSubview:_icoonImgV];
        _icoonImgV.cornerRadius = 36;
        _icoonImgV.backgroundColor = mainSchemeColor();
        _icoonImgV.layer.borderColor = Hex_Str_COLOR(@"#AAB3FE").CGColor;
        _icoonImgV.layer.borderWidth = 4;
        [_icoonImgV setImage:ImageNamed(@"wd")];
        
        CGFloat wid =(kAppW()/2-24-10);
        _leftContV = [[UIImageView alloc]initWithFrame:(CGRectMake(24, _icoonImgV.bottom+38, wid, wid/154*103))];
        [_leftContV setImage:ImageNamed(@"wd-ke yon pei e")];
        [self addSubview:_leftContV];
        
        _usedLab = [JMControl createLabelWithFrame:(CGRectMake(12, 24, _leftContV.width, 31)) Font:mediumFont(22) Text:@"" color:Hex_Str_COLOR(@"#A27430")];
        [_leftContV addSubview:_usedLab];
        
        _usedTitleLab = [JMControl createLabelWithFrame:(CGRectMake(_usedLab.left, _usedLab.bottom, _usedLab.width, 17)) Font:Font(12) Text:@"Cuota disponible" color:_usedLab.textColor];
        [_leftContV addSubview:_usedTitleLab];
        
        
        _rightContV = [[UIImageView alloc]initWithFrame:(CGRectMake(_leftContV.right+19, _icoonImgV.bottom+38, wid, wid/154*103))];
        [_rightContV setImage:ImageNamed(@"wd-dai huan")];
        [self addSubview:_rightContV];
        
        _totalLab = [JMControl createLabelWithFrame:(CGRectMake(12, 24, _leftContV.width, 31)) Font:mediumFont(22) Text:@"" color:Hex_Str_COLOR(@"#3C57F8")];
        [_rightContV addSubview:_totalLab];
        
        _totalTitleLab = [JMControl createLabelWithFrame:(CGRectMake(_usedLab.left, _usedLab.bottom, _usedLab.width, 17)) Font:Font(12) Text:@"Monto por reembolsa" color:_usedLab.textColor];
        [_rightContV addSubview:_totalTitleLab];
        
    }
    return self;
}
@end
